<template>
    <div class="havesee">
        <load-list 
        ref="list" 
        v-model="tableData" 
        :search="pgData" 
        :action="`${$store.state.api.tbUrl}/opportunity/viewedlist.json`" 
        @queryEnd="haveSeeAfter"
        >
            <template>

                <div 
                class="havesee_item" 
                v-for="(item,index) in tableData" 
                :key="index"
                v-czc="['商机人脉圈', '点击列表' , '已查看列表', index ,'businessContact-list-haveSeeList']"
                >

                    <items 
                        :item="item" 
                        :index="index" 
                        isShow="1" 
                        :isHaveSee="true" 
                        @portraitsClick="portraitsClick" 
                        @noticeClick="noticeClick"
                    ></items>
                </div>
            </template>
        </load-list>
    </div>
</template>

<script>
import notice from '@/mixins/notice.js';
import LoadList from '@components/sys/load-list.vue';
import items from './items.vue';

export default {
    components: {
        LoadList,
        items,
    },
    mixins: [notice],
    props: {},
    data() {
        return {
            tableData: [],
            pgData: {
                sortorder: 'desc',
                sortname: 'publishtime',
                pageindex: 1,
                pagesize: 10,
            },
        };
    },
    methods: {
        haveSeeAfter(val){
            this.setCzc(['商机人脉圈', '翻页', '已查看', val.current , 'businessContact-page-haveSeeList']);
        },

        //企业画像
        portraitsClick: function (data) {
            let routeData = this.$router.resolve({
                path: '/portraits',
                query: {
                    guid: data.companyid,
                    company: data.company,
                },
            });

            window.open(routeData.href, '_blank');
        },
        noticeClick: function (data) {
            this.openNotice(data.guid, data.noticetype, true);
        },
    },
    created() {},
    mounted() {
        
    },
};
</script>

<style lang="scss" scoped>
@import '@css/var.scss';

.havesee {
    
}
</style>
